﻿using System;
using RpcHelper;
using Wedonek.RpcStore.Service.DAL;
using Wedonek.RpcStore.Service.Interface;
using Wedonek.RpcStore.Service.Model;

namespace Wedonek.RpcStore.Service.Collect
{
        internal class TraceLogCollect : BasicCollect<RpcTraceLogDAL>, ITraceLogCollect
        {
                public RpcTraceLog[] Gets (string traceId)
                {
                        return base.BasicDAL.Gets (traceId);
                }
                public TraceLogDetailed Get (Guid id)
                {
                        TraceLogDetailed detailed = base.BasicDAL.Get (id);
                        if (detailed != null)
                        {
                                return detailed;
                        }
                        throw new ErrorException ("rpc.trace.log.not.find");
                }
        }
}
